package jinyilw.swing.visuals.Icomp;

import javax.swing.Icon;
import javax.swing.JLabel;

import jinyilw.swing.i18n.ICSetting;
import jinyilw.swing.i18n.LanguageChanger;

public class ILabel extends JLabel implements LanguageChanger
{
	private static final long serialVersionUID = 1232736857482627684L;
	protected ICSetting i18nSetting;

	public ILabel()
	{
	}

	public ILabel(String text)
	{
		super(text);
	}

	public ILabel(Icon image)
	{
		super(image);
	}

	public ILabel(String text, int horizontalAlignment)
	{
		super(text, horizontalAlignment);
	}

	public ILabel(Icon image, int horizontalAlignment)
	{
		super(image, horizontalAlignment);
	}

	public ILabel(String text, Icon icon, int horizontalAlignment)
	{
		super(text, icon, horizontalAlignment);
	}

	public ILabel(ICSetting iSetting)
	{
		setText(iSetting);
	}

	public ILabel(ICSetting iSetting, int horizontalAlignment)
	{
		super("", horizontalAlignment);
		setText(iSetting);
	}

	public ILabel(ICSetting iSetting, Icon icon, int horizontalAlignment)
	{
		super(icon, horizontalAlignment);
		setText(iSetting);
	}

	public void setICSetting(ICSetting iSetting)
	{
		i18nSetting = iSetting;
	}

	@Override
	public ICSetting getICSetting()
	{
		return i18nSetting;
	}

	@Override
	public void updateText(String text)
	{
		setText(text);
	}
}
